<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>换卡页面</title>
<%
	String bathPath = request.getContextPath();
	pageContext.setAttribute("bathPath", bathPath);
%>
  <link rel="stylesheet" href="${bathPath}/frame/layui/css/layui.css"  media="all">
  <script type="text/javascript" src="${bathPath}/js/jquery-1.9.1.min.js" ></script>
<script type="text/javascript" src="${bathPath}/js/ajaxSessionOut.js" ></script>
<!-- layer -->
<link type="text/css" rel="stylesheet" href="${bathPath}/js/layer/skin/layer.css"/>
<script type="text/javascript" src="${bathPath}/js/layer/layer.js" ></script>
<script src="${bathPath}/frame/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript">
function search(){
	//$('#dg').datagrid('load',getParam());
	var param=$("#form").serialize();
	//layer.confirm("是否要保存？", {btn: ['是', '否'], title: "提示"}, function(){
		//alert(1);
		$.ajax({
			 type:"POST",
			 async:false,
			 dataType:"text",
			 data:param,
		     url:"${bathPath}/aDKCardInfo/updateCardInfo.action",
		     success:function(data){
		    	/*  if(data!="SUCCESS"){
						layer.msg(data);
						
					} */
		    	 layer.confirm("保存成功！", {btn: ['确定'], title: "提示",skin:"my-skin"}, function(){
		    			layer.close(layer.index);
		    			parent.location.reload();
		    		}); 
		     }
		 });
		
}
layui.use('form', function(){
	  var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
	  //alert("${zuzhi.netgroupid}");
	  if("${zuzhi.keyword}"==0){
	     $("input[type=radio][name=keyword][value=0]").attr("checked",'checked');
     }else{
	     $("input[type=radio][name=keyword][value=1]").attr("checked",'checked');
     }
	  
	  //……
	  
	  //但是，如果你的HTML是动态生成的，自动渲染就会失效
	  //因此你需要在相应的地方，执行下述方法来手动渲染，跟这类似的还有 element.init();
	  form.render();
});
</script>
<style type="text/css">
	img {
		margin-left: 10px;
		width: 20px;
		height: 20px;
	}
	
	
	}
</style></head>
<body >
	
	
<div class="first_div" style="border-right:none;border-bottom:none;border-left:none;">

	<form class="layui-form layui-form-pane" action="" id="form">
     <div class="layui-form-item" style="margin-left: 50px; margin-top: 15px;">
    <label class="layui-form-label" >旧卡号</label>
	   <div class="layui-input-block" style="width: 150px;" >
	      <input type="text" id="cardID" name="cardID1" lay-verify="required" 
                   class="layui-input" value="${huan.cardID}" style="width: 200px;" />
	    </div>
  </div>

    <div class="layui-form-item" style="margin-left: 50px; margin-top: 15px;">
    <label class="layui-form-label" >新卡号</label>
	   <div class="layui-input-block" style="width: 150px;" >
	      <input type="text" id="cardID" name="cardID" lay-verify="required" placeholder="请输入" 
                   class="layui-input" value="" style="width: 200px;" />
	    </div>
  </div>


</form>
	 <div class="layui-form-item">
        <button class="layui-btn" lay-submit="" lay-filter="sub" style="margin-left:170px;" onclick="search()">保存</button>
    </div>
	<div style="margin:3px 10px 10px 10px;"></div>
	
	</div>
</body>
</html>